/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.prabhu.jeazyprops.props;

import java.util.Locale;
import java.util.ResourceBundle;

/**
 *
 * @author Prabhu Prabhakaran
 */
public class Constants {

    static ResourceBundle rb;
    public static String BooleanClassString = "java.lang.Boolean";
    public static String BooleanString = "boolean";
    public static String CharacterSetString = "UTF-8";
    public static String DoubleClassString = "java.lang.Double";
    public static String DoublePatternString = "^(-)?(\\d){1,10}\\.(\\d){1,10}$";
    public static String DoubleString = "double";
    public static String EncryptionAESString = "AES";
    public static String EncryptionDESString = "DESede";
    public static String FileBrowseButtonString = "001";
    public static String GroupTypeString = "002";
    public static String FileClassString = "java.io.File";
    public static String FloatClassString = "java.lang.Float";
    public static String FloatString = "float";
    public static String IntegerClassString = "java.lang.Integer";
    public static String IntegerPatternString = "^(-)?(\\d){1,9}$";
    public static String IntegerString = "int";
    public static String StringClassString = "java.lang.String";
    public static String TextPatternString = "^(\\S)(.){1,75}(\\S)$";
    public static String AllString = "003";
    static String AlertString = "007";
    static String DefaultBooleanString = "false";
    static String DefaultFloatString = "0.0";
    static String DefaultIntegerString = "0";
    static String DefaultStringString = "";
    static String DisplayNameAppendString = " : ";
    static String EncryptionErrorString = "020";
    static String ErrorString = "016";
    static String FileCloseErrorString = "009";
    static String FileCreationErrorString = "008";
    static String FileNotFoundString = "006";
    static String FileReadErrorString = "010";
    static String FileSeperatorString = "file.separator";
    static String GetMethodStartString = "get";
    static String IsMethodStartString = "is";
    static String JarSeperatorString = "/";
    static String MnenomicReplaceSymbolString = "";
    static String MnenomicSymbolString = "&";
    static String PrefixString = "";
    static String PrintEndString = "023";
    static String PrintTitleString = "022";
    static String PropertiesExtension = ".properties";
    static String PropertiesRootString = "properties";
    static String PropertiesStandard = "http://java.sun.com/dtd/properties.dtd";
    static String SaveButtonString = "011";
    static String ResetButtonString = "012";
    static String ScreenTitleString = "021";
    static String SetMethodStartString = "set";
    static String SuffixString = "";
    static String UpdateFailedString = "014";
    static String UpdateSuccessString = "015";
    static String UpdatedSuccessfullyString = "013";
    static String AboutTagLine = "024";
    static String AboutFileName = "025";
    static String AboutFileType = "026";
    static String AboutPropertiesCount = "027";
    static String AboutIsEncrypt = "028";
    static String AboutFileLocation = "029";
    static String AboutContactString = "004";
    static String ValidationErrorString = "017";
    static String AppImageFileName = "JeazyProps.jpg";
    static String XMLExtension = ".xml";
    static String lTabSpace = " ";
    static char SaveMnenomicSymbolString = 'S';
    static char ResetMnenomicSymbolString = 'R';
    static String PropsCommentLine = "*******************************************************************************\n This Property file is generated by JeazyProps. Please do not edit it Manually.\n For More Info: http://prabhuprabhakaran.wordpress.com/2012/09/09/jeazyprops/\n                http://java.net/projects/jeazyprops\n*******************************************************************************";
    static String XMLCommentLine = "\nThis Property file is generated by JeazyProps. Please do not edit it Manually.\n For More Info: http://prabhuprabhakaran.wordpress.com/2012/09/09/jeazyprops/\n                http://java.net/projects/jeazyprops\n";

    static {
        rb = ResourceBundle.getBundle("Bundle", Locale.US);
    }

    /**
     * Gets the Constant Value
     *
     * @param lString key value
     * @return
     */
    public static String get(String lString) {
        return rb.getString(lString);
    }

    /**
     * Gets the Constant Value
     *
     * @param lPropsArg replacement string
     * @param pID key value
     * @return
     */
    public static String get(String lPropsArg, String pID) {
        int indexOf = Constants.get(pID).indexOf("<");
        int indexOf1 = Constants.get(pID).indexOf(">");
        if (indexOf != -1 && indexOf1 != -1) {
            return Constants.get(pID).substring(0, indexOf) + lPropsArg + Constants.get(pID).substring(indexOf1 + 1);
        }
        return Constants.get(pID) + lPropsArg;
    }
}
